<template>
  <div class="box1">
    <div class="left1">
      <ul>
        <li v-for="item in arr" :key="item.id">
          <router-link :to="{ path: item.path }">{{ item.name }}</router-link>
        </li>
      </ul>
    </div>
    <div class="right1">
      <router-view></router-view>
    </div>
  </div>
</template>
<script>
export default {
  name: '',
  data () {
    return {
      arr: [
        {
          id: 1,
          path: '/monday',
          name: '星期一'
        },
        {
          id: 2,
          path: '/tuesday',
          name: '星期二'
        },
        {
          id: 3,
          path: '/wednesday',
          name: '星期三'
        }
      ]
    }
  },
  created () {
  },
  computed: {
  },
  methods: {
  }
}
</script>
<style lang='less'  scoped>
.box1 {
  height: 100%;
  display: flex;
}

.left1 {
  width: 200px; /* 设置左侧固定宽度 */
  height: 100%;
  background-color: #eee;
}

.right1 {
  height: 100%;
  display: flex;
  flex-grow: 1; /* 设置右侧自适应宽度 */
  background-color: #ccc;
}
ul {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: space-evenly;
  li {
    height: 30px;
    line-height: 30px;
    width: 100%;
    a {
      display: inline-block;
      height: 100%;
      width: 100%;
      text-decoration: none;
    }
  }
  text-align: center;
}
.router-link-exact-active {
  font-weight: bold;
  color: #f44336;
  background-color: #fff;
}
</style>
